package labs.laba_03;

public class PrimitiveCircle implements Primitive{
	private Dot center;
	private float radius;

	public PrimitiveCircle(Dot center, float radius) {
		this.center = center;
		this.radius = radius;
	}
	public Dot getCenter() {
		return center;
	}
	public float getRadius() {
		return radius;
	}
	public boolean onwDot(Dot d){
		if(center.getDistanceTo(d) <= radius) return true; 
		return false;
	}
	@Override
	public float getDistanceToOrigin() {
		return Math.abs(center.getDistanceTo(new Dot(0.0f, 0.0f)));
	}
}
